<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>消息历史记录-短信群发</title>
<link href="/majiang/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="/majiang/Public/admin/js/jquery.js"></script>

<link href="/majiang/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/majiang/Public/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="/majiang/Public/validform/Validform_Datatype.js"></script>

<link href="/majiang/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/majiang/Public/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="/majiang/Public/admin/js/select-ui.min.js"></script>

<link rel="stylesheet" href="/majiang/Public/FCBKcomplete/fcbkcomplete.css" />
<script type="text/javascript" src="/majiang/Public/FCBKcomplete/jquery.fcbkcomplete.js"></script>
<script type="text/javascript">
//如果是指定用户消息，则显示#user_li对象
function adduser(v){
	if(v=="2"){
		$("#user_li").show();
		$("#user_id").val("");
	}else{
		$("#user_li").hide();
		$("#user_id").val(0);
	}
}
</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<?php echo U('index/index');?>">首页</a></li>
			<li><a href="<?php echo U('smsmsginfo/index');?>">消息历史记录</a></li>
			<li><a href="#">短信群发</a></li>
		</ul>
    </div>
    
    <div class="formbody">
    
		<div class="formtitle"><span>短信群发</span></div>

		<form name="myform" id="myform" action="<?php echo U('smsmsginfo/sendsms');?>" method="post">
			<ul class="forminfo">
				<li><label>短信标题</label><input name="info[msg_title]" id="msg_title" type="text" class="dfinput" datatype="*" errormsg="短信标题不能为空！" maxlength="50" /><i class="Validform_checktip"></i></li>
				
				<li><label>发送对象类型</label>
					<div class="vocation">
						<select id="usertype" name="info[usertype]" datatype="*" nullmsg="发送对象类型不能为空！" errormsg="发送对象类型不能为空！" onchange="adduser(this.value);">
							<option value="">请选择类型</option>
							<option value="all">所有用户</option>
							<option value="0">所有非代理用户</option>
							<option value="1">所有代理用户</option>
							<option value="2">指定用户</option>
							<option value="3">系统消息</option>
							<option value="4">小喇叭</option>
							<option value="5">充值提示</option>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>
				<li id="user_li" style="display:none;"><label>发送对象</label>
				<select id="user_id" name="info[user_id]"></select>
				<i class="Validform_checktip"></i></li>
				
				<li><label>短信内容</label><textarea name="info[msg_content]" id="msg_content" cols="" rows="" datatype="*3-70" errormsg="发送对象类型不能为空！"  class="textinput" style="height: 50px;" maxlength="70"></textarea></li>

				<li><label>&nbsp;</label><input name="btn" type="submit" class="btn" value="确认保存"/></li>
			</ul>
		</form>
    
    </div>

	<style>
	.facebook-auto{margin-left:86px;}
	</style>
	<script>
	$(function(){
		//验证
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
		//自动补全
		$("#user_id").fcbkcomplete({
			width:335,
			json_url: "<?php echo U('smsmsginfo/fcbkcomplete');?>",                 
			maxitems: 10,
			input_min_size: 1,
			height: 10,
			complete_text: "开始键入...",
			select_all_text:  null
		});
		//select美化
		$("#usertype").uedSelect({
			width : 150			  
		});
	}); 
	</script>
</body>

</html>